package org.itboys.mobile.service.mongo.weixin.meal;

import org.itboys.coo.conmon.Finals;
import org.itboys.coo.entity.mongo.meal.CooMeal;
import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseMongoService;
import org.itboys.param.ParamUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 作者：zzq
 * 时间：2017/12/3
 * 描述：迈迪龙_微信_套餐
 */
@Service
public class CooWeixinMealService extends BaseMongoService<CooMeal>{
    @Resource(name = "mdlDs")
    private MongoDataSource mdlDataSource;
    @Override
    protected MongoDataSource getMongoDataSource() {
        return mdlDataSource;
    }

    @Override
    protected Class<CooMeal> getEntityClass() {
        return CooMeal.class;
    }

    /**
     * 查询
     * @param request
     * @return
     */
    public List<CooMeal> selectMeal(HttpServletRequest request){
        Map<String,Object> param= ParamUtil.packageMongoExactParam(request);
        param.put("isDeleted", Finals.NO);
        return super.list(param);
    }


}
